package com.lagou.edu.controller;

import com.lagou.edu.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author
 */
@CrossOrigin
@RequestMapping("/email")
@RestController
public class EmailController {

    @Autowired
    private EmailService emailService;

    @GetMapping("/{email}/{code}")
    public Boolean sendEmail(@PathVariable String email, @PathVariable String code){
        return emailService.sendAuthCode(email, code);
    }
}
